import request from '@/utils/request'

// 查询班次定义列表
export function listSchedefine(query) {
  return request({
    url: '/business/schedefine/list',
    method: 'get',
    params: query
  })
}

// 根据部门id查询班次定义列表
export function listSchedefineOfDeptId(query) {
  return request({
    url: '/business/schedefine/list-all',
    method: 'get',
    params: query
  })
}

// 查询班次定义详细
export function getSchedefine(id) {
  return request({
    url: '/business/schedefine/' + id,
    method: 'get'
  })
}

// 新增班次定义
export function addSchedefine(data) {
  return request({
    url: '/business/schedefine',
    method: 'post',
    data: data
  })
}

// 修改班次定义
export function updateSchedefine(data) {
  return request({
    url: '/business/schedefine',
    method: 'put',
    data: data
  })
}

// 删除班次定义
export function delSchedefine(id) {
  return request({
    url: '/business/schedefine/' + id,
    method: 'delete'
  })
}

// 导出班次定义
export function exportSchedefine(query) {
  return request({
    url: '/business/schedefine/export',
    method: 'get',
    params: query
  })
}
